﻿using DAO;
using DTO;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace BUS
{
    public class LoaiPinBUS
    {
/*-------------------------LOAD----------------------------------------------------
LOADLOAIPIN
*/
        public DataTable LoadLoaiPin()
        {
            LoaiPinDAO _lp = new LoaiPinDAO();
            return _lp.LoadLoaiPin();
        }

        public DataTable LoadLoaiPin_TheoPin()
        {
            LoaiPinDAO _lp = new LoaiPinDAO();
            return _lp.LoadLoaiPin_TheoPin();
        }
        public DataTable LoadLoaiPin_TheoMa(int MaLPin)
        {
            LoaiPinDAO _lp = new LoaiPinDAO();
            return _lp.LoadLoaiPin_TheoMa(MaLPin);
        }

/*-------------------------INSERT----------------------------------------------------
THEMLOAIPIN
	@TenLoai nvarchar(10),
	@TienMoiWatt int
 */
        public int ThemLoaiPin(LoaiPinDTO lp)
        {
            LoaiPinDAO _lp = new LoaiPinDAO();
            return _lp.ThemLoaiPin(lp);
        }
/*-------------------------UPDATE----------------------------------------------------
SUALOAIPIN @MaLPin int,
	@TenLoai nvarchar(10),
	@TienMoiWatt int
 */
        public int SuaLoaiPin(LoaiPinDTO lp)
        {
            LoaiPinDAO _lp = new LoaiPinDAO();
            return _lp.SuaLoaiPin(lp);
        }
/*-------------------------DELETE----------------------------------------------------
XOALOAIPIN @MaLPin int
*/
        public int XoaLoaiPin(int MaLPin)
        {
            LoaiPinDAO _lp = new LoaiPinDAO();
            return _lp.XoaLoaiPin(MaLPin);
        }
    }
}
